package com.daigoudao.web.service;

import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import com.daigoudao.web.model.BillModel;
import com.daigoudao.web.model.EvaluateModel;
import com.daigoudao.web.model.PurchaseRecord;
import com.daigoudao.web.model.TransInfoModel;

public interface ITransInfoService {

	/**
	 * 查询交易记录
	 * 
	 * @param transInfoModel
	 * @return
	 * @throws Exception
	 */
	public List<TransInfoModel> queryTransInfos(TransInfoModel transInfoModel)
			throws Exception;

	public List<BillModel> queryBill(BillModel billModel) throws Exception;

	public int getBillCount(int brokerId) throws Exception;

	public int getBillDetailCount(int brokerId) throws Exception;

	public List<BillModel> queryBillDetail(BillModel bill) throws Exception;

	public void updateStatus(TransInfoModel transInfoModel) throws Exception;

	public void evaluate(TransInfoModel transInfoModel,
			EvaluateModel evaluateModel) throws Exception;

	public int getTransCount(TransInfoModel transInfoModel) throws Exception;

	public Map<Integer, Integer> groupTransInfoByUser(int userId)
			throws Exception;

	public Map<Integer, Integer> groupTransInfoByBroker(int userId)
			throws Exception;

	public String getLastTransId() throws Exception;

	/**
	 * 添加订单信息
	 * 
	 * @param order
	 * @param shortMessage
	 * @throws Exception
	 */
	public String addOrder(TransInfoModel order) throws Exception;

	/**
	 * 查询订单详情
	 * 
	 * @param transInfoModel
	 * @return
	 * @throws Exception
	 */
	public TransInfoModel queryOrderDetail(TransInfoModel transInfoModel)
			throws Exception;

	/**
	 * 分页获取代购记录
	 * 
	 * @param record
	 * @return
	 */
	public List<PurchaseRecord> queryPurchaseRecords(PurchaseRecord record)
			throws Exception;

	/**
	 * 获取代购记录数
	 * 
	 * @param record
	 * @return
	 */
	public int getPurhcaseRecordCount(PurchaseRecord record) throws Exception;

	public TreeMap<String, String> getPayment(String tid) throws Exception;

	public TransInfoModel queryTran(String tid) throws Exception;

	/**
	 * 处理支付宝响应结果
	 * 
	 * @param alipayParams
	 * @throws Exception
	 */
	public void processAlipay(Map<String, String[]> alipayParams)
			throws Exception;
}
